$(function() {

});

Wind.use("artDialog", "iframeTools", function () {
    var api = art.dialog.open.api;          // art.dialog.open扩展方法
    if (!api)
        return;
    api.button({
        name: '保存',
        callback: function () {
        	var roleId =$("#role_id").val();  //角色id
        	//执行分配权限功能
    		var url = rootPath + '/system/roleInfo/saveRoleFunction.shtml';
    		var fs = getSelectFunctions();
    		var ids = '';
    		$.each(fs,function(i,f){
    			ids += f.id+","
    		});
    		var result = CommnUtil.ajax(url,{role_id:roleId,ids:ids},"json");
    		if(result=='success'){
    			tips("保存成功");
    			api.close();
    		}
    		return false;
    		/*if(s=="success"){
    			tips("保存成功");
    		}else{
    			tips("保存失败");
    		}*/
        },
        focus: true
    }, {
        name: '关闭'
    });
});